#ifndef ROT_AP_H
#define ROT_AP_H

#include <avr/io.h>

#define ROT_MIN 5000
#define ROT_MAX 10000

#define INV_DELTA 20

#define CTL_KI_NUM 8
#define CTL_KI_DEN 25
#define CTL_KP_NUM 4
#define CTL_KP_DEN 10

extern volatile uint16_t ctl_pos;
extern volatile int soma;

extern void ap_init(void);
extern void run_ap(void);
extern int pwm_to_rpm(unsigned int pwm_val);

#endif /* ROT_AP_H */
